package com.shop.shoporder.service.impl;

import com.shop.shoporder.entity.Spec;
import com.shop.shoporder.entity.SpecTwo;
import com.shop.shoporder.mapper.SpecMapper;
import com.shop.shoporder.mapper.SpecMapperCustom;
import com.shop.shoporder.service.SpecService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("SpecServiceImpl")
public class SpecServiceImpl implements SpecService {

    @Autowired
    private SpecMapper specMapper;

    @Autowired
    private SpecMapperCustom specMapperCustom;

    @Override
    public Spec selectByPrimaryKey(int id)
    {
        return specMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Spec> selectAll(Spec record)
    {
        return specMapperCustom.selectAll(record);
    }

    @Override
    public List<SpecTwo> selectAllTWO(Spec record) {
        return specMapperCustom.selectAllTWO(record);
    }

    @Override
    public int insertSelective(Spec record)
    {
        return specMapper.insertSelective(record);
    }

    @Override
    public int updateByPrimaryKeySelective(Spec record){return specMapper.updateByPrimaryKeySelective(record);}

    @Override
    public List<Spec> selectActivityGoods() {
        return specMapper.selectActivityGoods();
    }

    @Override
    public List<Spec> getList() {
        return specMapper.getList();
    }

}
